Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 skin-theme-clientpref-day vector-sticky-header-enabled" lang="de" dir="ltr"><head>
<meta charset="UTF-8">
<title>Douglas-Peucker-Algorithmus</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://de.wikipedia.org/wiki/Douglas-Peucker-Algorithmus"> <link href="./_mw_/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link href="./_mw_/ext.gadget.citeRef.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.defaultPlainlinks.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonHide.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonLayout.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonStyle.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiDarkmode.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiResponsive.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.specialSearch.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Douglas-Peucker-Algorithmus rootpage-Douglas-Peucker-Algorithmus skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Douglas-Peucker-Algorithmus</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="de" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="de" dir="ltr"><p>Der <b>Douglas-Peucker-Algorithmus</b> (auch <b>Ramer-Douglas-Peucker-Algorithmus</b>) ist ein <a href="Algorithmus" title="Algorithmus">Algorithmus</a> zur Kurven<a href="Gl%C3%A4tten_(Mathematik)" title="Glätten (Mathematik)">glättung</a> im Bereich der <a href="Vektorgrafik" title="Vektorgrafik">Vektorgrafik</a> und <a href="Generalisierung_(Kartographie)" class="mw-redirect" title="Generalisierung (Kartographie)">Generalisierung</a> von Karten. Das Ziel ist, einen durch eine <a href="Folge_(Mathematik)" title="Folge (Mathematik)">Folge</a> von <a href="Punkt_(Geometrie)" title="Punkt (Geometrie)">Punkten</a> gegebenen <a href="Polygonzug_(Mathematik)" title="Polygonzug (Mathematik)">Streckenzug</a> durch Weglassen einzelner Punkte (engl. <span lang="en">weeding</span>) so zu vereinfachen, dass die grobe Gestalt erhalten bleibt. Der Grad der Vergröberung wird gesteuert durch Vorgabe des maximalen Abstands zwischen den ursprünglichen Punkten und dem <a href="Approximation" title="Approximation">approximierenden</a> Streckenzug. Die Ausgangsform des Algorithmus wurde von Urs Ramer und (unabhängig) von <a href="David_Douglas_(Begriffskl%C3%A4rung)" class="mw-disambig" title="David Douglas (Begriffsklärung)">David Douglas</a> und Thomas Peucker angegeben.
</p>

<div class="mw-heading mw-heading2"><h2 id="Algorithmus">Algorithmus</h2></div>
<p>Der Algorithmus betrachtet den Streckenzug als Ganzes (globaler Ansatz) und schreitet zu feineren Approximationen fort. Dazu wird die Ausgangsfolge geeignet in zwei Abschnitte geteilt, die dann ihrerseits den Algorithmus durchlaufen (siehe <a href="Rekursion#Formale_Typen_von_Rekursion" title="Rekursion">Rekursion</a>). Der Algorithmus realisiert damit einen Ansatz nach dem Prinzip des <a href="Teile-und-herrsche-Verfahren" title="Teile-und-herrsche-Verfahren">Teile-und-herrsche-Verfahrens</a>.
</p>

<p>Gegeben ist der Ausgangsstreckenzug (Bild 0) als Folge von <i>n</i> Punkten
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle K=(P_{1},\dots ,P_{i},\dots ,P_{n})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>K</mi>
<mo>=</mo>
<mo stretchy="false">(</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle K=(P_{1},\dots ,P_{i},\dots ,P_{n})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/9cce374528996b6375467c317a3e3fd0c7a404ba.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.879ex; height:2.843ex;" alt="{\displaystyle K=(P_{1},\dots ,P_{i},\dots ,P_{n})}" loading="lazy"></span></dd></dl>
<p>sowie die Toleranz <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon >0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>ε<!-- ε --></mi>
<mo>&gt;</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varepsilon &gt;0}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/e04ec3670b50384a3ce48aca42e7cc5131a06b12.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.344ex; height:2.176ex;" alt="{\displaystyle \varepsilon >0}" loading="lazy"></span>.
</p><p>Als Approximation von <i>K</i> wird die Strecke <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\overline {P_{1}\,P_{n}}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mrow>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mspace width="thinmathspace"></mspace>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mrow>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\overline {P_{1}\,P_{n}}}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/db9853aee15c6d4e2ff47a8ed4ddc459f0e77dcc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.759ex; height:3.343ex;" alt="{\displaystyle {\overline {P_{1}\,P_{n}}}}" loading="lazy"></span> aus erstem und letztem Punkt betrachtet, <b>a</b> in Bild 1. Um zu prüfen, ob diese Approximation ausreicht, wird unter den <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n-2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
<mo>−<!-- − --></mo>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n-2}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/ff40d66ad535411eedb9c686a9008a5089c35ac0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.398ex; height:2.343ex;" alt="{\displaystyle n-2}" loading="lazy"></span> inneren Punkten von <i>K</i> derjenige Punkt <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{m}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{m}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/2a9fe75b337f415bcdd48e1ecc1eaffef21dab6a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.167ex; height:2.509ex;" alt="{\displaystyle P_{m}}" loading="lazy"></span> gesucht, welcher den größten Abstand von dieser Strecke hat:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d_{max}=\max _{i=2\dots n-1}d\left(P_{i},{\overline {P_{1}P_{n}}}\right)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
<mi>a</mi>
<mi>x</mi>
</mrow>
</msub>
<mo>=</mo>
<munder>
<mo movablelimits="true" form="prefix">max</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>=</mo>
<mn>2</mn>
<mo>…<!-- … --></mo>
<mi>n</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</munder>
<mi>d</mi>
<mrow>
<mo>(</mo>
<mrow>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mrow>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mrow>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mrow>
<mo>)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d_{max}=\max _{i=2\dots n-1}d\left(P_{i},{\overline {P_{1}P_{n}}}\right)}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/eb79bfb6d1a8fc9ac68db59e6b67c7192145ec94.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; width:28.936ex; height:5.176ex;" alt="{\displaystyle d_{max}=\max _{i=2\dots n-1}d\left(P_{i},{\overline {P_{1}P_{n}}}\right)}" loading="lazy"></span></dd></dl>
<p>In Bild 1 ist dies der Punkt <b>c</b> mit dem Abstand <b>b</b>. Ist <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n=2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
<mo>=</mo>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n=2}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/a02c8bd752d2cc859747ca1f3a508281bdbc3b34.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.656ex; height:2.176ex;" alt="{\displaystyle n=2}" loading="lazy"></span> oder <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d_{max}\leq \varepsilon }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
<mi>a</mi>
<mi>x</mi>
</mrow>
</msub>
<mo>≤<!-- ≤ --></mo>
<mi>ε<!-- ε --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d_{max}\leq \varepsilon }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/54e91975602fe1b8f38d4043bc0d98a369c30353.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.876ex; height:2.509ex;" alt="{\displaystyle d_{max}\leq \varepsilon }" loading="lazy"></span>, so ist die Approximation ausreichend und die inneren Punkte werden ggf. verworfen. Andernfalls wird die Approximation zu <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (P_{1},P_{m},P_{n})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (P_{1},P_{m},P_{n})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/665d24d4e80139ab87ad4d4a2dd9bbb915c1dfcb.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.302ex; height:2.843ex;" alt="{\displaystyle (P_{1},P_{m},P_{n})}" loading="lazy"></span> verfeinert und die beiden Teilfolgen
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle K_{1}=(P_{1},\dots ,P_{m})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>K</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mo stretchy="false">(</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle K_{1}=(P_{1},\dots ,P_{m})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/2f5ebb55034b85e52767fac35fb580c88a2a126a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.827ex; height:2.843ex;" alt="{\displaystyle K_{1}=(P_{1},\dots ,P_{m})}" loading="lazy"></span> &nbsp; und &nbsp; <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle K_{2}=(P_{m},\dots ,P_{n})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>K</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>=</mo>
<mo stretchy="false">(</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle K_{2}=(P_{m},\dots ,P_{n})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/65b495fcfb0fb0fd02cd6c6f83321f77cf531360.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.991ex; height:2.843ex;" alt="{\displaystyle K_{2}=(P_{m},\dots ,P_{n})}" loading="lazy"></span></dd></dl>
<p>werden ihrerseits daraufhin überprüft, ob ihre inneren Punkte verworfen werden können (Bild 2 und 3).
</p><p>Das Ergebnis des Algorithmus ist der durch die Folge der nicht verworfenen Punkte definierte Streckenzug, blau in Bild 4. Keiner der verworfenen Punkte, grau in Bild 4, hat zum Ergebnis einen Abstand größer als <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>ε<!-- ε --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varepsilon }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/a30c89172e5b88edbd45d3e2772c7f5e562e5173.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.083ex; height:1.676ex;" alt="{\displaystyle \varepsilon }" loading="lazy"></span>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Pseudocode">Pseudocode</h3></div>
<pre>function DouglasPeucker(PointList[], epsilon)
// Finde den Punkt mit dem größten Abstand
dmax = 0
index = 0
for i = 2 to (length(PointList) −1)
d = LotrechterAbstand(PointList[i], Line(PointList[1], PointList[end]))
if d &gt; dmax
index = i
dmax = d
</pre>
<pre> // Wenn die maximale Entfernung größer als Epsilon ist, dann rekursiv vereinfachen
if dmax &gt; epsilon
// Recursive call
recResults1[] = DouglasPeucker(PointList[1...index], epsilon)
recResults2[] = DouglasPeucker(PointList[index...end], epsilon)
</pre>
<pre> // Ergebnisliste aufbauen
ResultList[] = {recResults1[1...end-1], recResults2[1...end]}
else
ResultList[] = {PointList[1], PointList[end]}
</pre>
<pre> // Ergebnis zurückgeben
return ResultList[]
end
</pre>
<div class="mw-heading mw-heading2"><h2 id="Abstandsformel">Abstandsformel</h2></div>
<p>Liegt der Streckenzug (zumindest in guter Näherung) in einer Ebene, so lassen sich die Abstände <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d_{i}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/abe3154db7d4f92fb42dd1f80f52f528c6312e4a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.009ex; height:2.509ex;" alt="{\displaystyle d_{i}}" loading="lazy"></span> effizient berechnen, indem man vor der <a href="Iteration#Informatik" title="Iteration">Iteration</a> über die inneren Punkte <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{i}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/3ba1396129f7be3c7f828a571b6649e6807d10d3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.292ex; height:2.509ex;" alt="{\displaystyle P_{i}}" loading="lazy"></span> einen in der Ebene liegenden <a href="Normaleneinheitsvektor" class="mw-redirect" title="Normaleneinheitsvektor">Normaleneinheitsvektor</a> zur Geraden durch <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{1}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/398f438d75434e6fbf48dc232c1ad7228a738568.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.547ex; height:2.509ex;" alt="{\displaystyle P_{1}}" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{n}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5949c8b1de44005a1af3a11188361f2a830842d1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.711ex; height:2.509ex;" alt="{\displaystyle P_{n}}" loading="lazy"></span> ermittelt und diesen dann jeweils mit den Verschiebungs<a href="Vektor" title="Vektor">vektoren</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\overrightarrow {P_{1}P_{i}}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mrow>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mrow>
<mo>→<!-- → --></mo>
</mover>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\overrightarrow {P_{1}P_{i}}}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/e1fd897e386c67264f561ecb85f62e1e149fe56d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-top: -0.449ex; width:4.969ex; height:4.176ex;" alt="{\displaystyle {\overrightarrow {P_{1}P_{i}}}}" loading="lazy"></span> <a href="Skalarprodukt" title="Skalarprodukt">skalar multipliziert</a>. In mehr als zwei Dimensionen berechnet man zuerst den Fußpunkt des <a href="Lot_(Mathematik)" title="Lot (Mathematik)">Lotes</a>.
</p><p>Die Autoren Ramer bzw. Douglas und Peucker hatten die Möglichkeit nicht berücksichtigt, dass der Fußpunkt des Lotes nicht auf der Verbindungslinie liegt, sondern außerhalb, auf ihrer Verlängerung. Dadurch können Punkte wegfallen, die vom Endergebnis einen größeren als den zugesicherten Abstand haben.
</p>
<div class="mw-heading mw-heading2"><h2 id="Literatur">Literatur</h2></div>
<ul><li>Urs Ramer: <i>An iterative procedure for the polygonal approximation of plane curves.</i> In: <i>Computer Graphics and Image Processing.</i> Band 1, Nr. 3, 1972, <span class="-print"><a href="Internationale_Standardnummer_f%C3%BCr_fortlaufende_Sammelwerke" title="Internationale Standardnummer für fortlaufende Sammelwerke">ISSN</a>&nbsp;<span style="white-space:nowrap"><a rel="nofollow" class="external text" href="https://zdb-katalog.de/list.xhtml?t=iss%3D%220146-664X%22&amp;key=cql">0146-664X</a></span></span>, S. 244–256, <a href="https://doi.org/10.1016/S0146-664X(72)80017-0" class="extiw external" title="doi:10.1016/S0146-664X(72)80017-0">doi:10.1016/S0146-664X(72)80017-0</a>.</li>
<li>David Douglas, Thomas Peucker: <i>Algorithms for the reduction of the number of points required to represent a digitized line or its caricature.</i> In: <i>The Canadian Cartographer.</i> Band 10, Nr. 2, 1973, <span class="-print"><a href="Internationale_Standardnummer_f%C3%BCr_fortlaufende_Sammelwerke" title="Internationale Standardnummer für fortlaufende Sammelwerke">ISSN</a>&nbsp;<span style="white-space:nowrap"><a rel="nofollow" class="external text" href="https://zdb-katalog.de/list.xhtml?t=iss%3D%220008-3127%22&amp;key=cql">0008-3127</a></span></span>, S. 112–122.</li>
<li>Geoffrey Dutton: <i>Scale, Sinuosity and Point Selection in Digital Line Generalization.</i> In: <i>Cartography and Geographic Information Science.</i> Band 26, Nr. 1, 1999, <span class="-print"><a href="Internationale_Standardnummer_f%C3%BCr_fortlaufende_Sammelwerke" title="Internationale Standardnummer für fortlaufende Sammelwerke">ISSN</a>&nbsp;<span style="white-space:nowrap"><a rel="nofollow" class="external text" href="https://zdb-katalog.de/list.xhtml?t=iss%3D%221523-0406%22&amp;key=cql">1523-0406</a></span></span>, S. 33–54, <a href="https://doi.org/10.1559/152304099782424929" class="extiw external" title="doi:10.1559/152304099782424929">doi:10.1559/152304099782424929</a> (<a rel="nofollow" class="external text" href="http://www.spatial-effects.com/papers/jour/GDutton-CAGIS.pdf">GDutton-CAGIS.pdf spatial-effects.com</a>; PDF).</li>
<li>Konrad Ebisch: <i>A correction to the Douglas–Peucker line generalization algorithm.</i> In: <i>Computers &amp; Geosciences.</i> Band 28, 2002, Nr. 8, <span class="-print"><a href="Internationale_Standardnummer_f%C3%BCr_fortlaufende_Sammelwerke" title="Internationale Standardnummer für fortlaufende Sammelwerke">ISSN</a>&nbsp;<span style="white-space:nowrap"><a rel="nofollow" class="external text" href="https://zdb-katalog.de/list.xhtml?t=iss%3D%220098-3004%22&amp;key=cql">0098-3004</a></span></span>, S. 995–997, <a href="https://doi.org/10.1016/S0098-3004(02)00009-2" class="extiw external" title="doi:10.1016/S0098-3004(02)00009-2">doi:10.1016/S0098-3004(02)00009-2</a> (<a rel="nofollow" class="external text" href="https://web.archive.org/web/20150914113139/http://mappinghacks.com/code/PolyLineReduction">Polyline Reduction -- 3DSoftware.com</a>).</li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
Dieser Artikel wurde von <a class="external text" title="Zuletzt bearbeitet am 2021-08-16" href="https://de.wikipedia.org/wiki/?title=Douglas-Peucker-Algorithmus&amp;oldid=214798014">Wikipedia</a> herausgegeben. Der Text ist unter <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.de">Creative Commons Attribution-Share Alike 4.0</a> verfügbar, sofern nicht anders angegeben. Für die Mediendateien können zusätzliche Bedingungen gelten.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>

</body></html>